﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OnlineGames
{
    class Program
    {
        static void Main(string[] args)
        {
            cl_0423_PlayerBuilder pb = new cl_0423_PlayerBuilderA();
            cl_0423_PlayerCreatorDirector pcd = new cl_0423_PlayerCreatorDirector();
            pcd.setPlayerBuilder(pb);
            cl_0423_Player player = pcd.construct();

            Console.WriteLine();
            Console.WriteLine("************************");
            Console.WriteLine();
            Console.WriteLine("本次创建人物对象");
            Console.WriteLine(player.getBody());
            Console.WriteLine(player.getCostume());
            Console.WriteLine(player.getWeapon());


            Console.WriteLine();
            Console.WriteLine("************************");
            Console.WriteLine();
            cl_0423_Player player1= new cl_0423_Player("昵称:小红————");
          
            player1.shot();
            player1.move();
            player1.beAttacked();
            player1.move();
            player1.pause();
            player1.start();
            player1.move();
            player1.shot();
            player1.pause();

           

            Console.WriteLine();
            Console.WriteLine("************************");
            Console.WriteLine();

            cl_0423_Player player2 = new cl_0423_Player("小明");
            cl_0423_WeaponFactory weaponFactory = new cl_0423_SniperRifleFactory();
            weaponFactory.createWeapon();
            cl_0423_Weapon weapon = new cl_0423_SniperRifle();
            player2.add(weapon);
            player2.use();
            Console.ReadKey();



        }
    }
}
